<template>
  <view class="da1">
    <list :cart="cart" title="2"></list>
  </view>
</template>

<script>

import list from "../../components/list/list.vue"
import {insomniatopics} from "../../utils/API/homeapi";

export default {
  components: {
    list
  },
  data() {
    return {
      cart: [],
      arr: []
    };
  },
  mounted() {
    this.xuan()
  },
  computed: {
    sun() {
      var a = 230 / (this.cart.length - 1) + 'px'
      return a
    }
  },
  methods: {
    async xuan() {
      let {
        data
      } = await insomniatopics()
      this.cart = data;
    }
  }

}
</script>

<style lang="scss" scoped>
.da1 {
  //#f0f5f9  #d6e8ff
  background: linear-gradient(to bottom, #d6e8ff, #f0f5f9);
  height: 667px;
  box-sizing: border-box;
  padding-top: 70px;
}
</style>
